package br.com.moxeon.model.financialitems;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import br.com.moxeon.model.financialaccounts.BankAccount;

@SuppressWarnings("serial")
@Entity
@Table(name="cashier_check")
public class CashierCheck extends Check {
	
	@ManyToOne(targetEntity=BankAccount.class, fetch=FetchType.LAZY,optional=false)
	@JoinColumn(name="bank_account_id",nullable=false)
	private BankAccount bankAccount;
	
	@ManyToOne(targetEntity=Coupon.class,fetch=FetchType.LAZY,optional=true)
	@JoinColumn(name="coupon_id", nullable=true)
	private Coupon coupon;

	public Coupon getCoupon() {
		return coupon;
	}

	public void setCoupon(Coupon coupon) {
		this.coupon = coupon;
	}

	public BankAccount getBankAccount() {
		return bankAccount;
	}

	public void setBankAccount(BankAccount bankAccount) {
		this.bankAccount = bankAccount;
	}
}